/*
输入内容弹框
使用方法：

*/

import {createApp} from "vue";
import TSelectComponent from "./tSelect.vue";


const tSelect = (options) => {
	const tSelectApp = createApp(TSelectComponent, options);
	// 显示弹窗
	return showPrompt(tSelectApp, options);
}

const showPrompt = (app, options) => {
	const oFrag = document.createDocumentFragment();
	const vm = app.mount(oFrag);
	let dom = document.querySelector(options.wrapSelector);
	if(dom) {
		console.log(dom);
		dom.appendChild(oFrag);
		vm.show();
	} else {
		console.error('包裹层不能为空')
	}
	return vm;
}

export default tSelect;









